Optimal. Leaf size=124 \[ \frac {7 \tanh ^{-1}(\sin (c+d x))}{16 a^2 d}+\frac {7 \sec (c+d x) \tan (c+d x)}{16 a^2 d}+\frac {7 \sec ^3(c+d x) \tan (c+d x)}{24 a^2 d}+\frac {7 \sec ^5(c+d x) \tan (c+d x)}{30 a^2 d}-\frac {2 i \sec ^7(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3581, 3853,
3855} \begin {gather*} \frac {7 \tanh ^{-1}(\sin (c+d x))}{16 a^2 d}-\frac {2 i \sec ^7(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac {7 \tan (c+d x) \sec ^5(c+d x)}{30 a^2 d}+\frac {7 \tan (c+d x) \sec ^3(c+d x)}{24 a^2 d}+\frac {7 \tan (c+d x) \sec (c+d x)}{16 a^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3581
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \frac {\sec ^9(c+d x)}{(a+i a \tan (c+d x))^2} \, dx &=-\frac {2 i \sec ^7(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac {7 \int \sec ^7(c+d x) \, dx}{5 a^2}\\ &=\frac {7 \sec ^5(c+d x) \tan (c+d x)}{30 a^2 d}-\frac {2 i \sec ^7(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac {7 \int \sec ^5(c+d x) \, dx}{6 a^2}\\ &=\frac {7 \sec ^3(c+d x) \tan (c+d x)}{24 a^2 d}+\frac {7 \sec ^5(c+d x) \tan (c+d x)}{30 a^2 d}-\frac {2 i \sec ^7(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac {7 \int \sec ^3(c+d x) \, dx}{8 a^2}\\ &=\frac {7 \sec (c+d x) \tan (c+d x)}{16 a^2 d}+\frac {7 \sec ^3(c+d x) \tan (c+d x)}{24 a^2 d}+\frac {7 \sec ^5(c+d x) \tan (c+d x)}{30 a^2 d}-\frac {2 i \sec ^7(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac {7 \int \sec (c+d x) \, dx}{16 a^2}\\ &=\frac {7 \tanh ^{-1}(\sin (c+d x))}{16 a^2 d}+\frac {7 \sec (c+d x) \tan (c+d x)}{16 a^2 d}+\frac {7 \sec ^3(c+d x) \tan (c+d x)}{24 a^2 d}+\frac {7 \sec ^5(c+d x) \tan (c+d x)}{30 a^2 d}-\frac {2 i \sec ^7(c+d x)}{5 d \left (a^2+i a^2 \tan (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(294\) vs. \(2(124)=248\).
time = 2.30, size = 294, normalized size = 2.37 \begin {gather*} -\frac {\sec ^6(c+d x) \left (3072 i \cos (c+d x)+5 \left (210 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+21 \cos (6 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+315 \cos (2 (c+d x)) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+126 \cos (4 (c+d x)) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )-210 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-21 \cos (6 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+60 \sin (c+d x)-238 \sin (3 (c+d x))-42 \sin (5 (c+d x))\right )\right )}{7680 a^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 237 vs. \(2 (112 ) = 224\).
time = 0.27, size = 238, normalized size = 1.92
method | result | size |
risch | \(-\frac {i \left (105 \,{\mathrm e}^{11 i \left (d x +c \right )}+595 \,{\mathrm e}^{9 i \left (d x +c \right )}+1386 \,{\mathrm e}^{7 i \left (d x +c \right )}+1686 \,{\mathrm e}^{5 i \left (d x +c \right )}-595 \,{\mathrm e}^{3 i \left (d x +c \right )}-105 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{120 d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{6}}+\frac {7 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{16 a^{2} d}-\frac {7 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{16 a^{2} d}\) | \(133\) |
derivativedivides | \(\frac {\frac {2 \left (-\frac {1}{4}+\frac {i}{2}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}+\frac {2 \left (\frac {9}{32}+\frac {5 i}{8}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {2 \left (\frac {9}{32}+\frac {3 i}{8}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {2 \left (-\frac {1}{12}+\frac {3 i}{4}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {2 \left (-\frac {1}{4}+\frac {i}{5}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{5}}-\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{6}}-\frac {7 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{16}+\frac {2 \left (\frac {1}{4}+\frac {i}{2}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {2 \left (\frac {9}{32}-\frac {3 i}{8}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\frac {2 \left (-\frac {1}{12}-\frac {3 i}{4}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {2 \left (-\frac {1}{4}-\frac {i}{5}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {2 \left (-\frac {9}{32}+\frac {5 i}{8}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}+\frac {7 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{16}}{a^{2} d}\) | \(238\) |
default | \(\frac {\frac {2 \left (-\frac {1}{4}+\frac {i}{2}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}+\frac {2 \left (\frac {9}{32}+\frac {5 i}{8}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {2 \left (\frac {9}{32}+\frac {3 i}{8}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {2 \left (-\frac {1}{12}+\frac {3 i}{4}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {2 \left (-\frac {1}{4}+\frac {i}{5}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{5}}-\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{6}}-\frac {7 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{16}+\frac {2 \left (\frac {1}{4}+\frac {i}{2}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {2 \left (\frac {9}{32}-\frac {3 i}{8}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\frac {2 \left (-\frac {1}{12}-\frac {3 i}{4}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {2 \left (-\frac {1}{4}-\frac {i}{5}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {2 \left (-\frac {9}{32}+\frac {5 i}{8}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}+\frac {7 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{16}}{a^{2} d}\) | \(238\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 421 vs. \(2 (110) = 220\).
time = 0.31, size = 421, normalized size = 3.40 \begin {gather*} \frac {\frac {2 \, {\left (\frac {135 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {96 i \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {445 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {960 i \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {330 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {960 i \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {330 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {480 i \, \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} - \frac {445 \, \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} + \frac {480 i \, \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}} + \frac {135 \, \sin \left (d x + c\right )^{11}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{11}} - 96 i\right )}}{a^{2} - \frac {6 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {15 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {20 \, a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {15 \, a^{2} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} - \frac {6 \, a^{2} \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}} + \frac {a^{2} \sin \left (d x + c\right )^{12}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{12}}} + \frac {105 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} - \frac {105 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}}}{240 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 326 vs. \(2 (110) = 220\).
time = 0.43, size = 326, normalized size = 2.63 \begin {gather*} \frac {105 \, {\left (e^{\left (12 i \, d x + 12 i \, c\right )} + 6 \, e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, e^{\left (8 i \, d x + 8 i \, c\right )} + 20 \, e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, e^{\left (4 i \, d x + 4 i \, c\right )} + 6 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 105 \, {\left (e^{\left (12 i \, d x + 12 i \, c\right )} + 6 \, e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, e^{\left (8 i \, d x + 8 i \, c\right )} + 20 \, e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, e^{\left (4 i \, d x + 4 i \, c\right )} + 6 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right ) - 210 i \, e^{\left (11 i \, d x + 11 i \, c\right )} - 1190 i \, e^{\left (9 i \, d x + 9 i \, c\right )} - 2772 i \, e^{\left (7 i \, d x + 7 i \, c\right )} - 3372 i \, e^{\left (5 i \, d x + 5 i \, c\right )} + 1190 i \, e^{\left (3 i \, d x + 3 i \, c\right )} + 210 i \, e^{\left (i \, d x + i \, c\right )}}{240 \, {\left (a^{2} d e^{\left (12 i \, d x + 12 i \, c\right )} + 6 \, a^{2} d e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, a^{2} d e^{\left (8 i \, d x + 8 i \, c\right )} + 20 \, a^{2} d e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, a^{2} d e^{\left (4 i \, d x + 4 i \, c\right )} + 6 \, a^{2} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{2} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {\sec ^{9}{\left (c + d x \right )}}{\tan ^{2}{\left (c + d x \right )} - 2 i \tan {\left (c + d x \right )} - 1}\, dx}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.59, size = 203, normalized size = 1.64 \begin {gather*} \frac {\frac {105 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{2}} - \frac {105 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a^{2}} + \frac {2 \, {\left (135 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 480 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{10} - 445 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 480 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 330 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 960 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 330 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 960 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 445 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 96 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 135 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 96 i\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{6} a^{2}}}{240 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.31, size = 191, normalized size = 1.54 \begin {gather*} \frac {7\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,a^2\,d}-\frac {-\frac {9\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{8}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,4{}\mathrm {i}+\frac {89\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{24}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,4{}\mathrm {i}+\frac {11\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,8{}\mathrm {i}+\frac {11\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,8{}\mathrm {i}+\frac {89\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,4{}\mathrm {i}}{5}-\frac {9\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8}+\frac {4}{5}{}\mathrm {i}}{a^2\,d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}^6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________